/*
 * @Author: 朝言夕识 11442050+we-know-each-other-every-day@user.noreply.gitee.com
 * @Date: 2024-07-20 17:06:53
 * @LastEditors: 朝言夕识 11442050+we-know-each-other-every-day@user.noreply.gitee.com
 * @LastEditTime: 2024-07-20 18:27:50
 * @FilePath: \hm-shopping\src\api\login.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

export const getPicCode = () => {
  return request.get('/captcha/image')
}

export const getMsgCode = (captchaCode, captchaKey, mobile) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      captchaCode,
      captchaKey,
      mobile
    }
  })
}

export const codeLogin = (mobile, smsCode) => {
  return request.post('/passport/login', {
    form: {
      isParty: false,
      mobile,
      partyData: {},
      smsCode
    }
  })
}
